package com.info.zhiduoduo.repository.entity.company;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import lombok.Data;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author bob
 * @since 2021-07-05
 */
@Data
@Accessors(chain = true)
@TableName("zdd_long_term_project_item")
public class LongTermProjectItem extends Model<LongTermProjectItem> {

    private static final long serialVersionUID = 1L;

    /**
     * 子项目id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 长期项目id
     */
    @TableField("project_id")
    private Integer projectId;
    /**
     * 企业id
     */
    private Integer compid;
    /**
     * 创客id
     */
    private Integer userid;
    /**
     * 创客提交验收的金额
     */
    @TableField("submit_amount")
    private BigDecimal submitAmount;
    /**
     * 企业验收通过的金额(发票开票金额)
     */
    @TableField("deal_amount")
    private BigDecimal dealAmount;
    /**
     * 实际支付给创客的金额
     */
    @TableField("pay_amount")
    private BigDecimal payAmount;
    /**
     * 税费
     */
    @TableField("tax_fee")
    private BigDecimal taxFee;
    /**
     * 项目税率
     */
    @TableField("tax_rate")
    private Double taxRate;
    /**
     * 总服务费
     */
    @TableField("service_charge")
    private BigDecimal serviceCharge;
    /**
     * 项目基础服务费率
     */
    @TableField("base_service_rate")
    private Double baseServiceRate;
    /**
     * 项目所有合伙人项目服务费分润费率
     */
    @TableField("partner_service_rate")
    private Double partnerServiceRate;
    /**
     * 验收图片证据url
     */
    @TableField("attachment_url")
    private String attachmentUrl;
    /**
     * 企业拒绝验收原因
     */
    @TableField("reject_reason")
    private String rejectReason;
    /**
     * 创客提交验收的备注
     */
    @TableField("submit_remark")
    private String submitRemark;
    /**
     * 状态 1:已提交 2:验收通过 3:拒绝验收
     */
    private Integer state;
    /**
     * 支付方式 1:线上九歌代付 2:线下支付 3:企业商户号支付 4:九歌线下代付
     */
    @TableField("pay_type")
    private Integer payType;
    /**
     * 项目提交验收时间
     */
    @TableField("check_start_time")
    private Date checkStartTime;
    /**
     * 项目验收结束时间(通过或拒绝)
     */
    @TableField("check_end_time")
    private Date checkEndTime;
    private Date createtime;
    @TableField(update = "now()")
    private Date updatetime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
